from unittest import TestSuite
from unittest import TestProgram

import test_pimport
import test_pimport_after_edit


class PPatchesTestProgram(TestProgram):

    def parseArgs(self, argv):
        super(TestProgram2, self).parseArgs(argv)
        
        if self.test.countTestCases():
            return

        suite1 = self.testLoader.loadTestsFromModule(test_pimport)
        suite2 = self.testLoader.loadTestsFromModule(test_pimport_after_edit)
        self.test = TestSuite([suite1, suite2])


PPatchesTestProgram()
